The weak-heap data structure: Variants and applications

نویسندگان

  • Stefan Edelkamp
  • Amr Elmasry
  • Jyrki Katajainen
چکیده

The weak heap is a priority queue that was introduced as a competitive structure for sorting. Its array-based form supports the operations find -min in O(1) worst-case time, and insert and delete-min in O(lg n) worst-case time using at most dlg ne element comparisons. Additionally, its pointer-based form supports delete and decrease in O(lg n) worst-case time using at most dlg ne element comparisons. In this paper we enhance this data structure as follows: 1. We improve the array-based form to support insert in O(1) amortized time. The main idea is to temporarily store the inserted elements in a buffer, and, once the buffer is full, to move its elements to the heap using an efficient bulk-insertion procedure. As an application, we use this variant in the implementation of adaptive heapsort. Accordingly, we guarantee, for several measures of disorder, that the formula expressing the number of element comparisons performed by the algorithm is optimal up to the constant factor of the high-order term. Unlike other previous constantfactor-optimal adaptive sorting algorithms, adaptive heapsort relying on the developed priority queue is practically workable. 2. We improve the pointer-based form to support insert and decrease in O(1) worst-case time per operation. The expense is that delete then requires at most 2dlg ne element comparisons, but this is still better than the 3blg nc bound known for run-relaxed heaps. The main idea is to allow some nodes to violate the weak-heap ordering; we call the resulting priority queue a relaxed weak heap. We also develop a more efficient amortized variant that provides delete guaranteeing an amortized bound of 1.5dlg ne element comparisons, which is better than the 2dlog φne bound known for 1The material on adaptive sorting was presented at the 22nd International Workshop on Combinatorial Algorithms held in Victoria, Canada, in June 2011; and the material on shortest paths was presented at the 18th Computing: The Australasian Theory Symposium in Melbourne, Australia, in February 2012. Preprint submitted to Elsevier January 12, 2013 Fibonacci heaps, where φ is the golden ratio. As an application, we use this variant in the implementation of Dijkstra’s shortest-paths algorithm. Experimental results indicate that weak heaps are practically efficient; they are competitive with other priority-queue structures when considering the number of element comparisons performed, and lose by a small margin when considering the actual running time.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Weak-Heap Family of Priority Queues in Theory and Praxis

In typical applications, a priority queue is used to execute a sequence of n insert , m decrease, and n delete-min operations, starting with an empty structure. We study the performance of different priority queues for this type of operation sequences both theoretically and experimentally. In particular, we focus on weak heaps, weak queues, and their relaxed variants. We prove that for relaxed ...

متن کامل

Stability Analysis and Stabilization of Miduk Heap Leaching Structure, Iran

To construct copper heap leaching structures, a stepped heap of ore is placed over an isolated sloping surface and then washed with sulphuric acid. The isolated bed of such a heap consists of some natural and geosynthetic layers. Shear strength parameters between these layers are low, so they form the possible sliding surfaces of the heaps. Economic and environmental considerations call for stu...

متن کامل

Weak Heaps and Friends: Recent Developments

A weak heap is a variant of a binary heap where, for each node, the heap ordering is enforced only for one of its two children. In 1993, Dutton showed that this data structure yields a simple worstcase-efficient sorting algorithm. In this paper we review the refinements proposed to the basic data structure that improve the efficiency even further. Ultimately, minimum and insert operations are s...

متن کامل

Effects of Pregnant Leach Solution Temperature on the Permeability of Gravelly Drainage Layer of Heap Leaching Structures

In copper heap leaching structures, the ore is leached by an acidic solution. After dissolving the ore mineral, the heap is drained off in the acidic solution using a drainage system (consisting of a network of perforated polyethylene pipes and gravelly drainage layers) and is, then, transferred to the leaching plant for copper extraction where the copper is extracted and the remaining solution...

متن کامل

Weak variants of Martin ’

A hierarchy of weak variants of Martin’s Axiom is extended and shown to be strict.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Discrete Algorithms

دوره 16  شماره 

صفحات  -

تاریخ انتشار 2012